package com.hmall.common.config;

import com.hmall.common.interceptor.MyFeignInterceptor;
import feign.Logger;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description TODO
 * @Author fang
 * @Date 2023-06-06 21:39
 */
@EnableFeignClients(basePackages = "com.hmall.common.client", defaultConfiguration = DefaultFeignConfiguration.class)
@Configuration
public class DefaultFeignConfiguration {
    @Bean
    public Logger.Level loggerLevel() {
        return Logger.Level.BASIC;
    }

    @Bean
    public MyFeignInterceptor myFeignInterceptor() {
        return new MyFeignInterceptor();
    }
}
